const routes = [
    {
        path:'/login',
        component: ()=> import('@/views/login/index.vue'),
        title:'登录'
    },
    {
        path:'/',
        redirect:'/home',
        component:{render:(e)=>e('router-view')},
        children:[
          {
            path:'home',
            name:'Home',
            component:()=> import('@/views/home/index.vue'),
            meta:{
              title:'首页'
            }
          }
        ]
    },
    {
        path:'/register',
        component:()=> import('@/views/register/index.vue'),
        meta:{
          title:'注册'
        }
    },
    {
      path:'/patient',
      component:{render:(e)=>e('router-view')},
      children:[
        {
          path:'order',
          component:()=> import('@/views/patientOrder/index.vue'),
          meta:{
            title:'订单列表'
          }
        }
      ]
    },
    {
      path:'/personal',
      component:{render:(e)=>e('router-view')},
      children:[
        {
          path:'information',
          component: ()=> import ('@/views/personalInformation/index.vue'),
          meta:{
            title:'个人信息'
          }
        }
      ]
    },
    {
      path:'/appointment',
      component:{render:(e)=>e('router-view')},
      children:[
        {
          path:'list',
          component: ()=> import ('@/views/appointmentList/index.vue'),
          meta:{
            title:'预约列表'
          }
        }
      ]
      
    },
    {
      path:'/doctor',
      component:{render:(e)=>e('router-view')},
      children:[
      {
        path:'list/:id',
        component: ()=> import('@/views/doctorList/index.vue'),
        meta:{
          title:'医生列表'
        }
      }
     ]
    }
]

export default routes